<template>
  <div class="home">
    <van-nav-bar title="首页" />
    <van-button block type="primary" native-type="submit" @click="logout">退出登录</van-button>
    <jmash-dict-select
      is-link
      readonly
      label="证件类型"
      placeholder="选择证件类型"
      type-code="TypeID"
      v-model="model"
    ></jmash-dict-select>
    <jmash-dict-picker type-code="TypeID" />
  </div>
</template>
<script setup lang="ts" name="login">
import { useRouter } from "vue-router";
import { useUserStoreHook } from "@/stores/modules/user";

const model = ref("02");

const router = useRouter();
const userStore = useUserStoreHook();
function logout() {
  userStore.logout().then(() => {
    router.push(`/login`);
  });
}
</script>
<style></style>
